﻿using DFS = DocumentFormat.OpenXml.Lite.Core.DocumentFS;
using DocumentFormat.OpenXml.Lite.DrawingML.Chart;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Lite.DrawingML.Style;

namespace DocumentFormat.OpenXml.Lite.DrawingML
{
    public class Helper
    {
        public static void ExtractChart(string file, System.IO.Stream content, DFS.Directory sandbox)
        {
            ChartSpace chart = new ChartSpace();
            chart.Deserialize(content);

            sandbox.CreateFile(file.Replace('\\', '/'), chart);
        }

        public static void ExtractTheme(string file, System.IO.Stream content, DFS.Directory sandbox)
        {
            Theme theme = new Theme();
            theme.Deserialize(content);

            sandbox.CreateFile(file.Replace('\\', '/'), theme);
        }
    }
}
